package com.appkubes.mall.core.pojo;

import com.appkubes.mall.core.po.MallSystemConfigGlobal;
import com.appkubes.mall.core.po.MallSystemConfigGlobalExample;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.session.RowBounds;
import org.apache.ibatis.type.JdbcType;

public interface MallSystemConfigGlobalMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_system_config_global
     *
     * @mbg.generated
     */
    @SelectProvider(type=MallSystemConfigGlobalSqlProvider.class, method="countByExample")
    long countByExample(MallSystemConfigGlobalExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_system_config_global
     *
     * @mbg.generated
     */
    @DeleteProvider(type=MallSystemConfigGlobalSqlProvider.class, method="deleteByExample")
    int deleteByExample(MallSystemConfigGlobalExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_system_config_global
     *
     * @mbg.generated
     */
    @Delete({
        "delete from mall_system_config_global",
        "where global_config_key = #{globalConfigKey,jdbcType=VARCHAR}"
    })
    int deleteByPrimaryKey(String globalConfigKey);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_system_config_global
     *
     * @mbg.generated
     */
    @Insert({
        "insert into mall_system_config_global (global_config_key, system_code, ",
        "config_type_code, config_code, ",
        "config_level, config_name, ",
        "config_value, parent_global_config_key)",
        "values (#{globalConfigKey,jdbcType=VARCHAR}, #{systemCode,jdbcType=VARCHAR}, ",
        "#{configTypeCode,jdbcType=VARCHAR}, #{configCode,jdbcType=VARCHAR}, ",
        "#{configLevel,jdbcType=INTEGER}, #{configName,jdbcType=VARCHAR}, ",
        "#{configValue,jdbcType=VARCHAR}, #{parentGlobalConfigKey,jdbcType=VARCHAR})"
    })
    int insert(MallSystemConfigGlobal record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_system_config_global
     *
     * @mbg.generated
     */
    @InsertProvider(type=MallSystemConfigGlobalSqlProvider.class, method="insertSelective")
    int insertSelective(MallSystemConfigGlobal record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_system_config_global
     *
     * @mbg.generated
     */
    @SelectProvider(type=MallSystemConfigGlobalSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="global_config_key", property="globalConfigKey", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="system_code", property="systemCode", jdbcType=JdbcType.VARCHAR),
        @Result(column="config_type_code", property="configTypeCode", jdbcType=JdbcType.VARCHAR),
        @Result(column="config_code", property="configCode", jdbcType=JdbcType.VARCHAR),
        @Result(column="config_level", property="configLevel", jdbcType=JdbcType.INTEGER),
        @Result(column="config_name", property="configName", jdbcType=JdbcType.VARCHAR),
        @Result(column="config_value", property="configValue", jdbcType=JdbcType.VARCHAR),
        @Result(column="parent_global_config_key", property="parentGlobalConfigKey", jdbcType=JdbcType.VARCHAR)
    })
    List<MallSystemConfigGlobal> selectByExampleWithRowbounds(MallSystemConfigGlobalExample example, RowBounds rowBounds);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_system_config_global
     *
     * @mbg.generated
     */
    @SelectProvider(type=MallSystemConfigGlobalSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="global_config_key", property="globalConfigKey", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="system_code", property="systemCode", jdbcType=JdbcType.VARCHAR),
        @Result(column="config_type_code", property="configTypeCode", jdbcType=JdbcType.VARCHAR),
        @Result(column="config_code", property="configCode", jdbcType=JdbcType.VARCHAR),
        @Result(column="config_level", property="configLevel", jdbcType=JdbcType.INTEGER),
        @Result(column="config_name", property="configName", jdbcType=JdbcType.VARCHAR),
        @Result(column="config_value", property="configValue", jdbcType=JdbcType.VARCHAR),
        @Result(column="parent_global_config_key", property="parentGlobalConfigKey", jdbcType=JdbcType.VARCHAR)
    })
    List<MallSystemConfigGlobal> selectByExample(MallSystemConfigGlobalExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_system_config_global
     *
     * @mbg.generated
     */
    @Select({
        "select",
        "global_config_key, system_code, config_type_code, config_code, config_level, ",
        "config_name, config_value, parent_global_config_key",
        "from mall_system_config_global",
        "where global_config_key = #{globalConfigKey,jdbcType=VARCHAR}"
    })
    @Results({
        @Result(column="global_config_key", property="globalConfigKey", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="system_code", property="systemCode", jdbcType=JdbcType.VARCHAR),
        @Result(column="config_type_code", property="configTypeCode", jdbcType=JdbcType.VARCHAR),
        @Result(column="config_code", property="configCode", jdbcType=JdbcType.VARCHAR),
        @Result(column="config_level", property="configLevel", jdbcType=JdbcType.INTEGER),
        @Result(column="config_name", property="configName", jdbcType=JdbcType.VARCHAR),
        @Result(column="config_value", property="configValue", jdbcType=JdbcType.VARCHAR),
        @Result(column="parent_global_config_key", property="parentGlobalConfigKey", jdbcType=JdbcType.VARCHAR)
    })
    MallSystemConfigGlobal selectByPrimaryKey(String globalConfigKey);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_system_config_global
     *
     * @mbg.generated
     */
    @UpdateProvider(type=MallSystemConfigGlobalSqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("record") MallSystemConfigGlobal record, @Param("example") MallSystemConfigGlobalExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_system_config_global
     *
     * @mbg.generated
     */
    @UpdateProvider(type=MallSystemConfigGlobalSqlProvider.class, method="updateByExample")
    int updateByExample(@Param("record") MallSystemConfigGlobal record, @Param("example") MallSystemConfigGlobalExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_system_config_global
     *
     * @mbg.generated
     */
    @UpdateProvider(type=MallSystemConfigGlobalSqlProvider.class, method="updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(MallSystemConfigGlobal record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_system_config_global
     *
     * @mbg.generated
     */
    @Update({
        "update mall_system_config_global",
        "set system_code = #{systemCode,jdbcType=VARCHAR},",
          "config_type_code = #{configTypeCode,jdbcType=VARCHAR},",
          "config_code = #{configCode,jdbcType=VARCHAR},",
          "config_level = #{configLevel,jdbcType=INTEGER},",
          "config_name = #{configName,jdbcType=VARCHAR},",
          "config_value = #{configValue,jdbcType=VARCHAR},",
          "parent_global_config_key = #{parentGlobalConfigKey,jdbcType=VARCHAR}",
        "where global_config_key = #{globalConfigKey,jdbcType=VARCHAR}"
    })
    int updateByPrimaryKey(MallSystemConfigGlobal record);
}